<!--
 * @Description: 相对定位
 * @Author: zzj
 * @Date: 2021-08-18 14:29:55
 * @LastEditors: zzj
 * @LastEditTime: 2021-08-18 14:46:52
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>相对定位</title>
    <style>
        body{
            margin: 0;
            padding: 0;
        }
        .one,.two{
            height: 100px;
            width: 500px;
        }
        .one{
            background-color: red;
            position: relative;
            opacity: .5;
            top:50px;
            left:50px;
        }
        .two{
            width: 600px;
            background-color: lightblue;
        }
    </style>
</head>
<body>
    <div class="one"></div>
    <div class="two"></div>
    <div class="three"></div>
</body>
</html>